<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage="" %>
<%@ page import="dao.pojo.Files" %>
<%@ page import="java.util.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE3 {font-size: 21px}
.STYLE9 {
	font-size: 36px;
	color: blue;
}
.STYLE10 {
	font-size: 24px;
	color: blue;
}
.STYLE12 {color: red}
-->
</style>
</head>

<body>
<table width="90%" height="543"  align="center">
    <tr>
    <td width="100%" height="120"><%@include file="header.jsp"%></td>
      </tr>
  <tr>
    <td height="335" valign="top"><table width="100%" height="344" align="center" >
      <tr>
        <td height="63" align="left" valign="bottom"><table width="100%">
          <tr>
            <td height="39" valign="bottom" class="STYLE7 STYLE8"><table width="100%" height="51">
              <tr>
                <td width="28%" height="45" valign="bottom" class="STYLE9">&nbsp;&nbsp; Resource </td>
                <td width="72%" valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="STYLE12"><a href="ShowUpload">upload</span></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="4"><hr align="left" width="70%" color="#6589d1" valign="top"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="152" valign="top"><table width="100%" >
          <tr>
            <td width="7%" height="265">&nbsp;</td>
            <td width="65%" align="center" valign="top"><p class="STYLE10">Download  </p>
              <table>
                <tr>
                    <td bgcolor="#99CCFF">File Name</td>
                    <td bgcolor="#99CCFF"></td>
                    <td bgcolor="#99CCFF">Descriptions</td>
                    <td bgcolor="#99CCFF"></td>
                    <td bgcolor="#99CCFF">Upload Time</td>
                    <td bgcolor="#99CCFF"></td>
                    <td bgcolor="#99CCFF">Publisher</td>
                    <td bgcolor="#99CCFF"></td>
                    <td bgcolor="#99CCFF">Download</td>
                </tr>
                <% ArrayList<Files> fileList = (ArrayList<Files>) session.getAttribute("fileList");
                    Iterator<Files> it=fileList.iterator();
                    while(it.hasNext()){
                        Files files=it.next();
                %>
                <tr>
                    <td><%=files.getFileName()%></td>
                    <td>|</td>
                    <td><%=files.getFileInfo()%></td>
                    <td>|</td>
                    <%
                    	GregorianCalendar calendar=new GregorianCalendar();
                    	calendar.setTimeInMillis(files.getSubmitTime().getTime());
                     %>
                    <td><%=calendar.get(Calendar.YEAR)%>/<%=calendar.get(Calendar.MONTH)+1%>/<%=calendar.get(Calendar.DAY_OF_MONTH)+1%></td>
                    <td>|</td>
                    <td><%=files.getUser().getUserName()%></td>
                    <td>|</td>
                    <td><a href="GetFile?file_id=<%=files.getId()%>">Download It!</a></td>
                </tr>
                <%
                    }
                %>
            </table>              </td>
            <td width="28%" valign="top"><p></p>
              </td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>

<table width="90%" align="center">
  <tr>
    <td valign="top"><%@include file="footer.jsp"%></td>
  </tr>
</table>
</body>

</html>
